package cn.czg.cms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("comment")
public class Comment {
    @TableId(type = IdType.AUTO)
    private Long id;

    private Long postId;      // 被评论的帖子
    private Long parentId;    // 若为评论的评论，则此字段为父评论ID，否则为0
    private String parentIds;    // 若为评论的评论，则此字段为父评论ID，否则为0
    private String avatar;
    private Long userId;
    private String content;

    private Integer likeCount;
    private Integer status;   // 1=正常, 0=隐藏/删除

    private LocalDateTime createdAt;
}
